﻿@{
    int page = ViewBag.PageIndex;
    int dept = ViewBag.DepartId;
    string kw = ViewBag.Keyowrd;
    string md = ViewBag.Operation;
}
@model  AdminUser
<div class="content-box">
    <div class="content-box-header">
        <h3 style="cursor: s-resize;">管理员管理</h3>
        <ul class="content-box-tabs">
            <li><a href="@Url.DomainRouteUrl(AreasConfig.Admin, new {action = "Index", controller = "AdminUser"})" id="List">列表</a></li>
            <li><a href="javascript:;" class="default-tab current">表单</a></li>
        </ul>
        <div class="clear"></div>
    </div>
    <div class="content-box-content">
        <div class="tab-content" id="tab2">
            <form action="@Url.DomainRouteUrl(AreasConfig.Admin, new { action = "Edit", controller = "AdminUser", md =md, page =page, dept =dept,kw=kw })" method="post" mark="StockForm">
                <fieldset>
                    <p>
                        <label>用户名：</label>
                        @Html.TextEdit("AdminUserName", "", Model.AdminUserName, new { Class = "text-input" }, new { req = 1, maxlen = 30, minlen = 4 }, new { label = "用户名", helper = "4-16位字母、数字、下划线或中文" })
                    </p>
                    @if (md == "add")
                    {
                        <p>
                            <label>密码</label>
                            @Html.TextEditPassword("AdminPassword", "", new { Class = "text-input" }, new { req = 1, maxlen = 20, minlen = 6, reg = "^[0-9|a-z|A-Z]{6,}$" }, new { label = "密码", helper = "6-16位数字和字母组成" })
                        </p>
                        <p>
                            <label>确认密码</label>
                            @Html.TextEditPassword("Password1", "", new { Class = "text-input", }, new { req = 1, maxlen = 30, minlen = 6, com = "AdminPassword" }, new { label = "确认密码", helper = "再次输入密码" })
                        </p>
                    }
                    <p>
                        <label>真实姓名</label>
                        @Html.TextEdit("AdminUseTrueName", Model.AdminUseTrueName, "", new { Class = "text-input" }, new { req = 1, maxlen = 15, minlen = 2 }, new { label = "真实姓名", helper = "请输入真实姓名" })
                    </p>
                    <p>
                        <label>性别</label>
                        @Html.RadioButton("AdminUseSex", 1, Model.AdminUseSex == 1, new { name = "sex" })男 &nbsp;&nbsp;&nbsp;
                        @Html.RadioButton("AdminUseSex", 2, Model.AdminUseSex == 2, new { name = "sex" })女
                    </p>
                    <p>
                        <label>部门</label>
                        <select name="AdminUserDepart" class="small-input">
                            <option value="1">Option 1</option>
                            <option value="2">Option 2</option>
                            <option value="3">Option 3</option>
                            <option value="4">Option 4</option>
                        </select>
                    </p>
                    <p>
                        <label>手机号码</label>
                        @Html.TextEdit("AdminUsePhone", Model.AdminUsePhone, "", new { Class = "text-input" }, new { req = 1, phone = 1 }, new { label = "手机号码", helper = "请输入手机号码" })
                    </p>
                    <p>
                        <label>固定电话</label>
                        @Html.TextEdit("AdminUseTel", Model.AdminUseTel, "", new { Class = "text-input" }, new { req = 1, tel = 1 }, new { label = "固定电话", helper = "请输入固定电话号码" })
                    </p>
                    <p>
                        <label>电子邮箱</label>
                        @Html.TextEdit("AdminUseEmail", Model.AdminUseEmail, "", new { Class = "text-input" }, new { email = 1 }, new { label = "电子邮箱", helper = "请输入电子邮箱" })
                    </p>
                    <p>
                        @Html.Hidden("AdminUserId", Model.AdminUserId)
                        <a tag="button" class="button" type="submit">提交</a>
</p>
                </fieldset>
                <div class="clear"></div>
            </form>
        </div>
    </div>
</div>